package com.zhonghui.modlules.user.eshopDomain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.eshop.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(
        value = "UserSign对象",
        description = "签到记录表"
)
public class UserSign  extends BaseDomain {
    private static final long serialVersionUID = 1L;
    @TableId(
            value = "id",
            type = IdType.AUTO
    )
    private Long id;
    @ApiModelProperty("用户uid")
    private Long uid;
    @ApiModelProperty("签到说明")
    private String title;
    @ApiModelProperty("获得积分")
    private Integer number;
    @ApiModelProperty("剩余积分")
    private Integer balance;

    public static UserSign.UserSignBuilder builder() {
        return new UserSign.UserSignBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public Long getUid() {
        return this.uid;
    }

    public String getTitle() {
        return this.title;
    }

    public Integer getNumber() {
        return this.number;
    }

    public Integer getBalance() {
        return this.balance;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setUid(final Long uid) {
        this.uid = uid;
    }

    public void setTitle(final String title) {
        this.title = title;
    }

    public void setNumber(final Integer number) {
        this.number = number;
    }

    public void setBalance(final Integer balance) {
        this.balance = balance;
    }

    public String toString() {
        return "UserSign(id=" + this.getId() + ", uid=" + this.getUid() + ", title=" + this.getTitle() + ", number=" + this.getNumber() + ", balance=" + this.getBalance() + ")";
    }

    public UserSign(final Long id, final Long uid, final String title, final Integer number, final Integer balance) {
        this.id = id;
        this.uid = uid;
        this.title = title;
        this.number = number;
        this.balance = balance;
    }

    public UserSign() {
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof UserSign)) {
            return false;
        } else {
            UserSign other = (UserSign)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                label73: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label73;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label73;
                    }

                    return false;
                }

                Object this$uid = this.getUid();
                Object other$uid = other.getUid();
                if (this$uid == null) {
                    if (other$uid != null) {
                        return false;
                    }
                } else if (!this$uid.equals(other$uid)) {
                    return false;
                }

                label59: {
                    Object this$number = this.getNumber();
                    Object other$number = other.getNumber();
                    if (this$number == null) {
                        if (other$number == null) {
                            break label59;
                        }
                    } else if (this$number.equals(other$number)) {
                        break label59;
                    }

                    return false;
                }

                Object this$balance = this.getBalance();
                Object other$balance = other.getBalance();
                if (this$balance == null) {
                    if (other$balance != null) {
                        return false;
                    }
                } else if (!this$balance.equals(other$balance)) {
                    return false;
                }

                Object this$title = this.getTitle();
                Object other$title = other.getTitle();
                if (this$title == null) {
                    if (other$title != null) {
                        return false;
                    }
                } else if (!this$title.equals(other$title)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserSign;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = super.hashCode();
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $uid = this.getUid();
        result = result * 59 + ($uid == null ? 43 : $uid.hashCode());
        Object $number = this.getNumber();
        result = result * 59 + ($number == null ? 43 : $number.hashCode());
        Object $balance = this.getBalance();
        result = result * 59 + ($balance == null ? 43 : $balance.hashCode());
        Object $title = this.getTitle();
        result = result * 59 + ($title == null ? 43 : $title.hashCode());
        return result;
    }

    public static class UserSignBuilder {
        private Long id;
        private Long uid;
        private String title;
        private Integer number;
        private Integer balance;

        UserSignBuilder() {
        }

        public UserSign.UserSignBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public UserSign.UserSignBuilder uid(final Long uid) {
            this.uid = uid;
            return this;
        }

        public UserSign.UserSignBuilder title(final String title) {
            this.title = title;
            return this;
        }

        public UserSign.UserSignBuilder number(final Integer number) {
            this.number = number;
            return this;
        }

        public UserSign.UserSignBuilder balance(final Integer balance) {
            this.balance = balance;
            return this;
        }

        public UserSign build() {
            return new UserSign(this.id, this.uid, this.title, this.number, this.balance);
        }

        public String toString() {
            return "UserSign.UserSignBuilder(id=" + this.id + ", uid=" + this.uid + ", title=" + this.title + ", number=" + this.number + ", balance=" + this.balance + ")";
        }
    }
}
